home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / recent / mcf4amrc.lha / MCF4AmIRC / Rexx / MCF_MKB.AMIRX < prev    next >
Text File  |  1996-09-17  |  2KB  |  15 lines

  1. /* MCF_MKB.AMIRX
  2. // $VER: MCF_MKB.AMIRX 4.4 (24.08.96)
  3. \\ Written by Donald T. Becker (dtbecker@postoffice.ptd.net) IRC: StarDustr
  4. // Please mail any bug reports/comments to the above address with a subject
  5. \\ header of MCF.AMIRX.
  6. //
  7. \\ ** What to do with this file?
  8. // Put this script in REXX:        It will be used by MCF.AMIRX.
  9. \\
  10. //  What else to do with this file.
  11. \\  Type   /Rx MCF_MKB User  in the channel you wish to perform a Mass Kick-Ban.
  12. //   User Must be either a NickName or the UserHost of those to be Kick-Banned.
  13. \\   or add Alias:  MKB /Rx MCF_MKB %p
  14. */
  15. ;parse arg MCFenv MyNick Unick CurCh jdata Rnick reason;OPTIONS RESULTS;if ":%MKB" ~=upper(jdata) then signal Master;address value(MCFenv);Unick=upper(Unick);Rnick=upper(Rnick);Client=substr(MCFenv,pos(".",MCFenv)+1);CName=CurCh||"."||Client;ChUs=getclip(value(CName));signal DoIt;Master:;if MCFenv="" then exit;reason=MyNick Unick CurCh jdata Rnick||reason;Rnick=upper(MCFenv);getmynick;MyNick=upper(result);getchannel;CurCh=result;getusers;ChUs=upper(result);Unick=MyNick;signal DoIt;DoIt:;if 0=pos(Rnick,ChUs) then;IPAddr=Rnick;else;do;userhost Rnick;IPAddr=upper(result);atpos=pos("@",IPAddr)+1;IPAddr=substr(IPAddr,atpos);end;xl=length(IPAddr);userhost MyNick;if right(upper(result),xl)=IPAddr then;do;userhost Unick;if right(upper(result),xl) ~=IPAddr then exit;end;"say /Rx NFK 99";UIP="*!*@"||IPAddr;"say /ban "UIP;cnt=0;do i=1 by 1 until ChUs="";parse value ChUs with user ChUs;if 0 ~=pos("@",user) then user=substr(user,2);if MyNick=user then iterate;if Unick=user then iterate;userhost user;UH=upper(result);if 0=pos(IPAddr,UH) then iterate;"say /kick " CurCh user reason;end i;"RAW PRIVMSG "MyNick" :MKB_Done";exit